package com.schoolgard.entitybean;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CardLog entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "CARD_LOG")
public class CardLog implements java.io.Serializable {

	// Fields

	private Long id;
	private Terminal terminal;
	private Student student;
	private Long cardedid;
	private Date cardtime;
	private Long hostid;
	private Date uptime;
	private Long cardtype;
	private Byte cardplace;
	private String remark;
	private String status;
	private String studentName;
	private String router;
	private Byte channelNo;

	// Constructors

	/** default constructor */
	public CardLog() {
	}

	/** minimal constructor */
	public CardLog(Long id, Terminal terminal, Student student) {
		this.id = id;
		this.terminal = terminal;
		this.student = student;
	}

	/** full constructor */
	public CardLog(Long id, Terminal terminal, Student student, Long cardedid,
			Date cardtime, Long hostid, Date uptime, Long cardtype,
			Byte cardplace, String remark, String status, String studentName,
			String router, Byte channelNo) {
		this.id = id;
		this.terminal = terminal;
		this.student = student;
		this.cardedid = cardedid;
		this.cardtime = cardtime;
		this.hostid = hostid;
		this.uptime = uptime;
		this.cardtype = cardtype;
		this.cardplace = cardplace;
		this.remark = remark;
		this.status = status;
		this.studentName = studentName;
		this.router = router;
		this.channelNo = channelNo;
	}

	// Property accessors
	@Id
	@Column(name = "ID", unique = true, nullable = false, precision = 10, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TERMINAL_GUID", nullable = false)
	public Terminal getTerminal() {
		return this.terminal;
	}

	public void setTerminal(Terminal terminal) {
		this.terminal = terminal;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "STUDENTID", nullable = false)
	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@Column(name = "CARDEDID", precision = 16, scale = 0)
	public Long getCardedid() {
		return this.cardedid;
	}

	public void setCardedid(Long cardedid) {
		this.cardedid = cardedid;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CARDTIME", length = 7)
	public Date getCardtime() {
		return this.cardtime;
	}

	public void setCardtime(Date cardtime) {
		this.cardtime = cardtime;
	}

	@Column(name = "HOSTID", precision = 16, scale = 0)
	public Long getHostid() {
		return this.hostid;
	}

	public void setHostid(Long hostid) {
		this.hostid = hostid;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "UPTIME", length = 7)
	public Date getUptime() {
		return this.uptime;
	}

	public void setUptime(Date uptime) {
		this.uptime = uptime;
	}

	@Column(name = "CARDTYPE", precision = 16, scale = 0)
	public Long getCardtype() {
		return this.cardtype;
	}

	public void setCardtype(Long cardtype) {
		this.cardtype = cardtype;
	}

	@Column(name = "CARDPLACE", precision = 2, scale = 0)
	public Byte getCardplace() {
		return this.cardplace;
	}

	public void setCardplace(Byte cardplace) {
		this.cardplace = cardplace;
	}

	@Column(name = "REMARK", length = 510)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "STATUS", length = 1)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Column(name = "STUDENT_NAME", length = 64)
	public String getStudentName() {
		return this.studentName;
	}

	public void setStudentName(String studentName) {
		this.studentName = studentName;
	}

	@Column(name = "ROUTER", length = 1024)
	public String getRouter() {
		return this.router;
	}

	public void setRouter(String router) {
		this.router = router;
	}

	@Column(name = "CHANNEL_NO", precision = 2, scale = 0)
	public Byte getChannelNo() {
		return this.channelNo;
	}

	public void setChannelNo(Byte channelNo) {
		this.channelNo = channelNo;
	}

}